<template>
  <div>404</div>
</template>

<script>
export default {
  mounted() {
    // setTimeout(() => {
    //   // location.href
    //   this.$router.push('/home')
    // }, 3000)
    let n = 1
    this.timer = setInterval(() => {
      if (n++ >= 3) {
        this.$router.push('/home').catch(() => {})
      }
      console.log(n)
    }, 1000)
  },
  beforeDestroy() {
    // console.log('beforeDestroy');
    this.timer && clearInterval(this.timer)
  }
}
</script>

<style lang="scss" scoped></style>
